package cache

import "time"

type expire struct {
	key string
	expire time.Time
}

type byTime []*expire

func (s byTime) Len() int {
	return len(s)
}

func (s byTime) Swap(i, j int) {
	s[i], s[j] = s[j], s[i]
}

func (s byTime) Less(i, j int) bool {
	return s[i].expire.Before(s[j].expire)
}
